/**
 * Project Name: mms-provider-user
 * File Name: AccountMapper
 * Package Name: om.scb.dev.mms.dao
 * Date: 2018/11/27 2:16 PM
 * Copyright (c) 2018, Wang, Haoyue All Rights Reserved.
 */
package com.scb.dev.mms.dao;

import com.scb.dev.mms.pojo.Account;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * ClassName: EmployeeMapper
 * Description: Account Mapper Interface
 * Date: 2018/11/27 2:16 PM
 *
 * @author Wang, Haoyue
 * @version V1.0
 * @since JDK 1.8
 */
@Mapper
public interface AccountMapper {

    /**
     * insertSelective: add new account
     *
     * @param account
     * @return  1,success; 0,failed
     */
    int insertSelective(Account account);

    /**
     * deleteByPrimaryKey: delete account by id
     *
     * @param accountId
     * @return  1,success; 0,failed
     */
    int deleteByPrimaryKey(String accountId);

    /**
     * updateByPrimaryKeySelective: update account
     *
     * @param account
     * @return  1,success; 0,failed
     */
    int updateByPrimaryKeySelective(Account account);

    /**
     * selectByPrimaryKey: query account by id
     *
     * @param accountId
     * @return
     */
    Account selectByPrimaryKey(String accountId);

    /**
     * selectByAccountName: query account by name
     *
     * @param accountName
     * @return
     */
    Account selectByAccountName(String accountName);

    /**
     * selectByAccountName: query name by id
     *
     * @param accountId
     * @return
     */
    String selectAccountNameByPrimaryKey(String accountId);

    /**
     * findAllAccount: get all accounts
     *
     * @return
     */
    List<Account> findAllAccount();
}